<section class="title">
<?php if ($this->method == 'create'): ?>
	<?php $readonly = '';?>
	<h4><?php echo lang('escort_withdrawal_add_title'); ?></h4>
<?php else: ?>
	<?php $readonly = 'readonly="readonly"';?>
	<h4><?php echo sprintf(lang('escort_withdrawal_edit_title'), $withdrawal->user_username); ?></h4>
<?php endif; ?>
</section>

<section class="item">
	
<?php echo form_open(uri_string(), 'class="crud"'); ?>
<div class="form_inputs" id="news-form">

	<fieldset>
	
		<ul>
			<li class="odd">
				<label for="user_id"><?php echo lang('escort_withdrawal_user_label'); ?></label>
				<div class="input">					
					<?php echo form_dropdown('user_id', $userList, $withdrawal->user_id.'_'.$withdrawal->user_type, 'id="user_id"') ?>
				</div>
			</li>
			<li class="even">
				<label for="created_date"><?php echo lang('escort_withdrawal_date_label'); ?> <span>*</span></label>
				<div class="input">
				<?php echo form_input('created_date',format_date($withdrawal->created_date), 'id="created_date" '); ?>
				</div>				
			</li>
			<li class="odd">
				<label for="money"><?php echo lang('escort_withdrawal_money_label'); ?></label>
				<div class="input">
					<?php echo form_input('money',$withdrawal->money, 'id="money" '); ?>
				</div>
			</li>
			<li class="even">
				<label for="status"><?php echo lang('escort_withdrawal_status_label'); ?></label>
				<div class="input">
					<?php echo form_dropdown('status', $statusList, $withdrawal->status, 'id="status" '); ?>
				</div>
			</li>
			<li class="even">
				<label for="paid_status"><?php echo lang('escort_withdrawal_payment_date_label'); ?></label>
				<div class="input">
					<?php 
					if($withdrawal->paid_date){
					?>
					<?php echo form_input('paid_date', format_date($withdrawal->paid_date), 'id="paid_date"')?>
					<?php
					}else{ 
					?>
					<?php echo form_input('paid_date', '', 'id="paid_date"')?>
					<?php
					}
					?>
				</div>
			</li>
			<li class="even">
				<label for="payment_method_id"><?php echo lang('escort_withdrawal_payment_method_label'); ?></label>
				<div class="input">
					<?php echo form_dropdown('payment_method_id', $paymentMeothodList, $withdrawal->payment_method_id, 'id="payment_method_id" '); ?>
				</div>
			</li>
			<li class="odd">
				<label for="payment_method_commentaries"><?php echo lang('escort_withdrawal_payment_method_commentaries_label'); ?></label>
				<div class="input">
					<?php echo form_textarea('payment_method_commentaries', $withdrawal->payment_method_commentaries)?>
				</div>
			</li>
		</ul>
	</fieldset>
</div>
<div class="buttons float-right padding-top">
<?php $this->load->view('admin/partials/buttons', array('buttons' => array('save', 'save_exit', 'cancel'))); ?>
</div>
<?php echo form_close(); ?>
</section>